package com.lijinjiang.reflect04_method;

/**
 * @ClassName Dog
 * @Description TODO
 * @Author Li
 * @Date 2022/9/20 21:36
 * @ModifyDate 2022/9/20 21:36
 * @Version 1.0
 */
public class Dog {
    private String name;

    public Dog() {
    }

    public Dog(String name) {
        this.name = name;
    }

    public void run() {
        System.out.println("小狗跑的飞快");
    }

    private void eat() {
        System.out.println("狗吃骨头");
    }

    private String eat(String name) {
        System.out.println("狗在吃" + name);
        return "吃的很开心";
    }

    public static void inAddr() {
        System.out.println("在上海有一只单身狗");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
